<?php
/**
 * Created by PhpStorm.
 * User: 764432054@qq.com
 * Date: 2020/3/4
 * Time: 14:35
 */
include  './init.php';
$pipe=createPipe();

$f = fopen($pipe,"r");


$str='';
while($msg=fread($f,1)){
    if($msg==PHP_EOL){
        echo $str.PHP_EOL;
        $str='';
    }else{
        $str.=$msg;
    }
}
unlink($pipe); //delete pipe
